#pragma once
#include "cocos2d.h"
 #include "BarrierSence.h"

class Barrier :
	public cocos2d::CCSprite ,public cocos2d::CCTouchDelegate
{
private:
	int _width;
	int _height;
	BarrierSence* layer;
	int stage;
public:
	void onExit();
	void onEnter();
	void setStage(int stage);
	void setStage(int width,int height);
	bool containsTouchLocation(cocos2d::CCTouch* touch);
	virtual bool ccTouchBegan(cocos2d::CCTouch* touch, cocos2d::CCEvent* event);
	cocos2d::CCRect rect();
	static Barrier* barrierWithFile(const char* file1,const char* file2,BarrierSence* layer);
};

